from flask import Blueprint, request, Response, current_app

knowledge_bp = Blueprint("knowledge", __name__, url_prefix="/knowledge")


@knowledge_bp.route("/upload", methods=["POST"])
def upload_knowledge():
    file_storage = request.files.get("file")
    print(file_storage.filename)
    print(file_storage.name)
    file_storage.save(f"D:\\desktop\\dyllm_backend\\application\\controllers\\{file_storage.filename}")
    file_storage.close()
    return "ok"
